package com.coderman.basketball.app.consumer;

import com.coderman.basketball.app.executor.TradeTeamApplyExecutor;
import com.coderman.basketball.domain.gataway.trade.TradeRepository;
import com.coderman.basketball.domain.model.trade.event.TradeApplyResultEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;

/**
 * Description: 交易申请结果消息消费
 * date: 2021/5/25
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 */
@Service
public class TradeApplyResultListener implements ApplicationListener<TradeApplyResultEvent> {

    @Autowired
    private TradeTeamApplyExecutor tradeTeamApplyExecutor;

    @Override
    public void onApplicationEvent(TradeApplyResultEvent tradeCheckResultEvent) {
        tradeTeamApplyExecutor.exeTradeApplyResultEvent(tradeCheckResultEvent);
    }
}
